#include "cpu/exec/template-start.h"

#define	instr	movsx

make_helper(concat(movsx_rm2r_b2_, SUFFIX)) {
	int len = 1 + concat(decode_rm2r_, SUFFIX)(eip + 1);
	DATA_TYPE_S temp;
	int8_t s = (int8_t) op_src->val;
	temp = s;
	OPERAND_W(op_dest, temp);

	print_asm_template2();
	return len;
}

#if	DATA_BYTE == 4
make_helper(movsx_rm2r_w2_l) {
	int len = 1 + decode_rm2r_l(eip + 1);
	int32_t temp;
	int16_t s = (int16_t) op_src->val;
	temp = s;
	OPERAND_W(op_dest, temp);

	print_asm_template2();
	return len;
}
#endif

#include "cpu/exec/template-end.h"
